home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / SCRIPTZ / CLONEFND.ZIP / clonefnd.txt
Text File  |  1996-12-23  |  3KB  |  87 lines

  1. 10/10/96 Hexadec's clone finder's for mIRC 4.6+
  2.  
  3. I have included 2 diffrent clone finders, one is fast and one
  4. is slow =)  The fast one requires the use of the IAL (Internal
  5. address list) the other uses a /who #channel.  In order to use
  6. the fast clone scanner the box in Tools | remotes which says
  7. "Internal Address List" must be checked.  Also the IAL must be
  8. fully updated, this can be done by typing /who #channel.  I find
  9. the best way to do this is add the following line to remote |
  10. events.
  11. 1:on join:#:if ($nick = $me) { .enable #clone_check | who $chan }
  12. This will fully update the IAL whenever you join a channel (it
  13. will also scan for clones. It is a good idea to change # to
  14. #Channel_Which_You_Op_In  eg. #lamers)  the /who #channel only
  15. only needs to be performed once, after that mIRC will take care
  16. of all the updating.  Boy I'm long winded ;)
  17.  
  18.  
  19. Channel Popups:
  20. »»»»»»»»»»»»»»»
  21. Clone Scan W/Who:who $chan | .enable #clone_scan
  22. Fast Clone Scan: {
  23.   :n
  24.   inc %i
  25.   if ($nick(%i,$chan) != $null) {
  26.     if ($address($nick(%i,$chan),0) = $null) { echo 4 $chan Your IAL isnt fully updated.  Please read the text file accompanying this script. | goto x }  
  27.     %y = $readini scan.ini x $address($nick(%i,$chan),3)
  28.     if (%y != $null) {
  29.       if ($address($nick(%i,$chan),3) !isin %s) { %s = %s $address($nick(%i,$chan),3) }
  30.     }
  31.     writeini scan.ini x $address($nick(%i,$chan),3) . $+ $nick(%i,$chan) $readini scan.ini x $address($nick(%i,$chan),3)
  32.     goto n
  33.   }
  34.   else {
  35.     if ($null == %s) { echo 4 $chan There are no clones in $chan }
  36.     :x
  37.     inc %z
  38.     if ($token(%z,32,%s) != $null) {
  39.       echo 4 $chan There are $count( [ $readini [ scan.ini x $token(%z,32,%s) ] ] ,.) clients from $token(%z,32,%s)
  40.       echo 4 $chan $remove( [ $readini [ scan.ini x $token(%z,32,%s) ] ] ,.)
  41.       goto x
  42.     }
  43.   }
  44.   :z
  45.   unset %i %z %s %y
  46.   remini scan.ini x
  47. }
  48.  
  49.  
  50. Raw:
  51. »»»»
  52. #clone_scan disabled
  53. 352:* {
  54.   %y = $readini scan.ini x $parm4
  55.   if (%y != $null) {
  56.     if ($parm4 !isin %s) { %s = %s $parm4 }
  57.   }
  58.   writeini scan.ini x $parm4 . $+ $parm6 $readini scan.ini x $parm4
  59.   halt
  60. }
  61. 315:* {
  62.   if (%s == $null) { echo 4 -a There are no clones }
  63.   :x
  64.   inc %z
  65.   if ($token(%z,32,%s) != $null) {
  66.     echo 4 -a There are $count( [ $readini [ scan.ini x $token(%z,32,%s) ] ] ,.) clients from *!*@ $+ $token(%z,32,%s)
  67.     echo 4 -a $remove( [ $readini [ scan.ini x $token(%z,32,%s) ] ] ,.)
  68.     goto x
  69.   }
  70.   unset %i %z %s %y
  71.   remini scan.ini x
  72.   .disable #clone_scan
  73.   halt
  74. }
  75. #clone_scan end
  76.  
  77.  
  78. Note: If you're wondering why I used writeini/$readini instead of variables it is
  79.          because using ini's works about two times faster than using variables!
  80.          With my 486/25mhz with 4 megs of ram it takes me about 15 seconds
  81.          to scan a channel with 200 clients using variables.  But using write/readini
  82.          it only takes 6 (I'm talking about the IAL scanner here, not the /who
  83.          #channel scanner).  This is with the *EXACT* same routine.  Of course
  84.          with a faster computer it would be *alot* quicker. =)  Using ini's is faster
  85.          because mIRC uses windows ini routine which is faster than the one it
  86.          uses for variables.  You can thank bfriendly for telling me using ini's is
  87.          faster and Khaled for telling me why =)